package Utile;


public class Point {
    private int PosX;
    private int PosY;

    public Point(int x,int y){
        PosX = x;
        PosY = y;
    }

    public int getPosX(){
        return PosX;
    }
    public int getPosY(){
        return PosY;
    }
    public void setPosX(int x){
        PosX = x;
    }
    
    public void setPosY(int y){
        PosY = y;
    }
    
    public void setPos(int x,int y){
    	PosX =x;
    	PosY =y;
    }
    
    
    public boolean compareCase(Point p){
    	return (this.PosX==p.getPosX()) && (this.PosY==p.getPosY());
    }
    
    @Override
	public String toString(){
    	return "Point x : "+ PosX+ ", y :"+PosY;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + PosX;
		result = prime * result + PosY;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Point other = (Point) obj;
		if (PosX != other.PosX)
			return false;
		if (PosY != other.PosY)
			return false;
		return true;
	}
    

}
